package cn.gdsdxy.dao;
import cn.gdsdxy.pojo.Goods;

import cn.gdsdxy.pojo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface GoodsDao {
    @Select("select * from t_goods")
    public List<Goods> getAllGoods();



    @Insert("insert into t_goods (id,name,price) values(#{id},#{name},#{price})")
    public int addGoods(Goods goods);

    @Delete("delete from  t_goods where id=#{id}")
    public int deleteGoods(int id);

    @Update("update t_goods set name=#{name},price=#{price} where id = #{id}")
    public int updataGoodS(Goods goods);

    @Select("select * from t_goods where id = #{id}")
    public List<Goods>  getidGoods(int id);
}
